#include "widget.h"
#include "ui_widget.h"

#include <QPushButton>
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_testButton_clicked()
{
    qDebug() << "测试按钮被点击了";
}

void Widget::on_changeButton_clicked()
{
    //获取按钮状态
    bool flag = ui->testButton->isEnabled();
    //改变按钮状态
    if(flag)
        ui->testButton->setEnabled(false);
    else
        ui->testButton->setEnabled(true);
}
